package com.ksyun.whgc.heruiming.work2;

import java.sql.Date;
import java.util.ArrayList;
import java.util.List;

/**
 * 2.创建学生对象，包括姓名、年龄、住址、出生年月等属性；
 *  模拟生成学生集合，基于字段注解、打印输出该集合，要求输出的第一行数据为字段名称、后续行数据为集合数据；
 *  不限输出格式，可以是excel、htm、txt等；
 *
 * 	2.1.定义注解类：用于标注集合对象属性；（10分）
 * 	2.2.定义工具类输出集合对象:集合输出时根据属性的标注输出属性字段名;(20分)
 */
public class work02 {

    public static List generatorData(){
        List<Student> students = new ArrayList<>();
        Student student1 = new Student("老王", 20, "武汉市硚口区", new Date(2012, 1, 1));
        Student student2 = new Student("老李", 20, "武汉市黄陂区", new Date(2019, 2, 2));
        Student student3 = new Student("老赵", 20, "武汉市江汉区", new Date(1299, 3, 3));
        Student student4 = new Student("老刘", 20, "武汉市青山区", new Date(1998, 4, 4));
        Student student5 = new Student("老牛", 20, "武汉市江岸区", new Date(2300, 5, 5));
        Student student6 = new Student("老孙", 20, "武汉市硚口区", new Date(1999, 6, 6));

        students.add(student1);
        students.add(student2);
        students.add(student3);
        students.add(student4);
        students.add(student5);
        students.add(student6);
        return students;
    }

    public static void main(String[] args) {
        List list = generatorData();
        PrintUtil.printStuList(list);
    }
}
